package com.validator.controller;

import com.validator.domain.UserVo;
import com.validator.response.ApiResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * 有效控制器
 *
 * @author Amadeus
 * @date 2024/04/03
 */
@Slf4j
@RestController
@RequestMapping("/valid")
public class ValidController {

    @PostMapping(value = "/test")
    public ApiResponse test(@Valid @RequestBody UserVo userVo){
        return ApiResponse.ok("成功");
    }

}
